/* button api */ 
const button = {
    attr: [
        {
            name: 'size',
            type: 'enum',
            defaultValue: '-',
            required: false,
            desc: '尺寸',
        },
        {
            name: 'type',
            type: 'enum',
            defaultValue: '-',
            required: false,
            desc: '按钮类型，在设置color时，后者优先',
        },
        {
            name: 'round',
            type: 'boolean',
            defaultValue: false,
            required: false,
            desc: '设置按钮圆角',
        },
        {
            name: 'disabled',
            type: 'boolean',
            defaultValue: false,
            required: false,
            desc: '设置按钮禁用',
        },
        {
            name: 'loading',
            type: 'boolean',
            defaultValue: false,
            required: false,
            desc: '加载状态',
        },
        
    ],
    event: [
        {
            name: 'click',
            params: '(context: { e: MouseEvent })',
            desc: '点击时触发',
        }
    ],
    slot: []
}



const link = {
    attr: [
        {
            name: 'type',
            type: 'enum',
            defaultValue: '',
            required: false,
            desc: '链接类型',
        },
        {
            name: 'underline',
            type: 'enum',
            defaultValue: '',
            required: false,
            desc: '下划线',
        },
        {
            name: 'target',
            type: 'enum',
            defaultValue: '',
            required: false,
            desc: '目标窗口',
        },
        {
            name: 'href',
            type: 'string',
            defaultValue: '',
            required: false,
            desc: '链接地址',
        },
        {
            name: 'disabled',
            type: 'boolean',
            defaultValue: false,
            required: false,
            desc: '设置链接禁用',
        },
    ],
    event: [
        {
            name: 'click',
            params: '(context: { e: MouseEvent })',
            desc: '点击时触发',
        }
    ],
    slot: []
}

const avatar = {
    attr: [
        {
            name: 'size',
            type: 'enum | string',
            defaultValue: 'middle',
            required: false,
            desc: 'avatar尺寸, 支持自定义大小',
        },
        {
            name: 'src',
            type: 'string | slot.defalut',
            defaultValue: '',
            required: true,
            desc: '图片路径和文件路径，文本（传递文本默认取第一个字符串）',
        },
        {
            name: 'hover',
            type: 'boolean',
            defaultValue: '',
            required: false,
            desc: '是否添加hover效果',
        },
        {
            name: 'alt',
            type: 'string',
            defaultValue: '',
            required: false,
            desc: 'alt',
        },
    ],
    event: [
        {
            name: 'click',
            params: '(context: { e: MouseEvent })',
            desc: '点击时触发',
        }
    ],
    slot: []
}

export default {
    button,
    link,
    avatar
}